package cn.xshi.bpm.web;

import cn.xshi.bpm.param.selfDefined.SelfDefinedStartParam;
import cn.xshi.bpm.service.SelfDefinedService;
import cn.xshi.bpm.vo.ActivityProcessStatusEntity;
import cn.xshi.common.base.BaseResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
/**
 * @Desc 自定义处理流程流转服务
 * @Author 邓纯杰
 * @CreateTime 2012-12-12 12:12:12
 */
@Api(value = "自定义处理流程流转服务",description = "自定义处理流程流转服务", tags = "自定义处理流程流转服务")
@RestController
@RequestMapping("/selfDefined")
public class SelfDefinedController {

    @Resource
    SelfDefinedService selfDefinedService;

    /**
     * 根据模块Key发起流程实例
     * @param selfDefinedStartParam
     * @return
     */
    @ApiOperation(value="根据模块Key发起流程实例", notes="根据模块Key发起流程实例")
    @PostMapping(value="/module/start")
    public BaseResult<ActivityProcessStatusEntity> start(@RequestBody SelfDefinedStartParam selfDefinedStartParam){
        return selfDefinedService.start(selfDefinedStartParam);
    }
}
